<?php
$this->breadcrumbs=array(
	'Usuários'=>array('index'),    
);
$this->menu=array(
	array('label'=>'Cadastrar Usuário', 'url'=>array('create')),
	array('label'=>'Gerenciar Usuários', 'url'=>array('admin')),
);

$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'tbl-user-grid',
        'pager' => array('cssFile' => Yii::app()->baseUrl . '/themes/'.Yii::app()->theme->name.'/gridView.css'),
        'cssFile' => Yii::app()->baseUrl . '/themes/'.Yii::app()->theme->name.'/css/gridView.css',
        'summaryText' => 'De {start} - {end} entre {count} records',
        'htmlOptions' => array('class' => 'grid-view rounded'),
	'dataProvider'=>$dataProvider,
	'columns'=>array(
		'id',
		'username',
                'nome',
		'profile',
            	 array(
                    'name'=>'img',
                    'type'=>'image',
                    'value'=> 'Yii::app()->baseUrl. "/images/".$data->img',  
                ),
                array(
                       'name'=>'party',
                       'type'=>'raw',
                       'value'=>'CHtml::encode(Lookup::item("Party",$data->party))'
                    ),
                array(
                       'name'=>'classe',
                       'type'=>'raw',
                       'value'=>'CHtml::encode(cad_parceiros::loadTableParceiro($data->classe))'
                    ),
		array(
			'class'=>'CButtonColumn',
                        'template' => '{view}',
                        'viewButtonUrl'=>'Yii::app()->createUrl("user/profile", array("id" =>$data->id))',
		),
	),
)); ?>